<?php
require_once "./config.php";
require_once "./function.php";
$con=connect();
$sql="select * from shopping";
$result=query($con,$sql);
// print_r($result);
$response=["code"=>0,"msg"=>"操作失败"];
if ($result) {
    $response["code"]=1;
    $response["msg"]="操作成功";
    $response["data"]=$result;
}
echo json_encode($response);
?>